//定义全局变量
var findtype=0;
$.ajaxSetup({
    headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}
});
//搜索事件
function page(page) {
    //获取文本里面的内容
    var search_text = $("#search_content").val();
    if (search_text != '')
    {
        $.ajax({
            type: 'POST',
            url: '/xrdt',
            data: {typeid: findtype, search_text: search_text,searchstatus:1,page:page},
            success: function (res) {
                if (res)
                {
                    $("#searchbox").html(res)
                }
            }
        });
    }
    else
    {
        alert("请输入关键词")
    }
}
function  searchtype(e) {
    $(e).siblings().removeAttr('class');//去除同级元素的class
    $(e).attr('class','selecttab');
    findtype = $(e).val();
}